Mac File > Preferences > Editor > General > Ensure line feed at file end on Save Windows File > Settings > Editor > General > Ensure line feed at file end on Save